package edu.ccut.saturn.studio.wfg.utils;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class SearchHelp {

	/**
	 * 把list转成数组
	 * 
	 * @param keys
	 * @return
	 */
	static public String[] conversion(List<String> keys) {
		Set<String> set1 = new HashSet<String>();
		set1.addAll(keys);
		String[] ss = new String[set1.size()];
		return ss = (String[]) set1.toArray(ss);
	}

	/**
	 * 将set转换成数组
	 * 
	 * @param set1
	 * @return
	 */
	// TODO:从set返回数组
	static public String[] conversion(Set<String> set1) {
		String[] ss = new String[set1.size()];
		return ss = (String[]) set1.toArray(ss);
	}
}
